﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="UserComments.aspx.cs" Inherits="Maticsoft.Web.UserComments" %>
<%@ Register Src="Header2.ascx" TagName="Header2" TagPrefix="uc1" %>
<%@ Register Src="footer.ascx" TagName="footer" TagPrefix="uc2" %>
<%@ Register src="UserLeft.ascx" tagname="UserLeft" tagprefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>会员中心</title>
    <link rel="stylesheet" href="css/reset.css" />
    <link rel="stylesheet" href="css/common.css" />
    <script src="js/jquery-1.8.2.js" type="text/javascript"></script>
    <script type="text/javascript">
        function SelectStar(i) {
            $("#txtPoints").val(i);
            for (var j = 1; j <= 5; j++) {
                if (j <= i) {
                    $("#img" + j).attr("src", "img/star-checked.png");
                }
                else {
                    $("#img" + j).attr("src", "img/star-nochecked.png");
                }
            }
            
        }

        function Chk() {
            if ($("#txtPoints").val() == "") {
                alert("请评分");
                return false;
            }
            if ($("#txtComments").val() == "") {
                alert("请添加评论");
                return false;
            }
            else if ($("#txtComments").val().length > 200) {
                alert("最多输入200个字符");
                return false;
            }
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <uc1:Header2 ID="Header21" runat="server" />
    <div class="row bg-gray" style="padding: 20px 0;">
        <div class="safe_width">
            <uc3:UserLeft ID="UserLeft1" runat="server" />
            <div class="right-cont">
                <div class="men-cen-tit mar-btm-10">
                    <a class="active" href="javascript:void(0);">添加评论</a>
                </div>
                <div class="row">
                    <ul class="equal-3 perf-infor">
                        <li>
                            <p>
                                评论产品：</p>
                            <div style="height:60px">
                                <asp:Literal ID="ltlProductName" runat="server"></asp:Literal></div>
                        </li>
                        <li>
                            <p>
                                评分：</p>
                            <div>
                                <img src="img/star-nochecked.png" onclick="SelectStar(1);" id="img1" /> <img src="img/star-nochecked.png" id="img2" onclick="SelectStar(2);" /> <img src="img/star-nochecked.png" onclick="SelectStar(3);" id="img3" /> <img src="img/star-nochecked.png" onclick="SelectStar(4);" id="img4" /> <img src="img/star-nochecked.png" onclick="SelectStar(5);" id="img5" /><asp:TextBox ID="txtPoints" runat="server" style="display:none;"></asp:TextBox> 
                               </div>
                        </li>
                        <li>
                            <p>
                                评论内容：</p>
                            <div>
                                <asp:TextBox ID="txtComments" TextMode="MultiLine" runat="server" Width="500px" Height="120px"></asp:TextBox></div>
                        </li>
                        <li>
                            <p>&nbsp;
                            </p>
                            <div class="fs-12 tc-gray" style="margin:100px 0">
                                <asp:Button ID="btnSave" runat="server" Text="保存" OnClientClick="return Chk();" OnClick="btnSave_Click" Style="height: 38px;
                                    line-height: 38px; border: 1px solid #E4393C; background-color: #E4393C; padding: 0 18px;
                                    color: #FFFFFF; font-size: 16px;" /><asp:HiddenField ID="hidProductId" runat="server" />
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <uc2:footer ID="footer1" runat="server" />
    </form>
</body>
</html>
